﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmReporteEncuesta.aspx.cs" Inherits="pryCallCenter.Procesos.ReporteEncuesta.frmReporteEncuesta" %>

<%@ Register Assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxRoundPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .periodo
        {
            width:275px;
        }
        .style3
        {
            margin-left: 36%;
            font-size: 16px;
        }
        .style4
        {
            width: 120px;
        }
        .style5
        {
            width:98% !important;
        }
        .style8
        {
          padding-right: 2.1em;
        }
        .style9
        {
            width: 708px;
        }
        .txtTotal
        {
            text-align:right;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="100%" HeaderText="Reporte de Encuestas">
        <PanelCollection>
            <dx:PanelContent>
                 <div class="CssHeader">
                    <div align="center" class="CssTitle4" >
                                REPORTE DE ENCUESTAS
                    </div>
                    <div class="CssRigth">
                        <dx:ASPxPanel ID="ASPxPanel1" runat="server" Width="100%">
                            <PanelCollection>
                                <dx:PanelContent>
                                    <table class="style1">
                                        <tr>
                                            <td class="style1">Usuario:</td>  
                                            <td>
                                                <dx:ASPxTextBox ID="txtUsuario" runat="server" Width="170px"></dx:ASPxTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>Fecha de Reporte:</td>    
                                            <td>
                                                <dx:ASPxDateEdit ID="dtpFecha" runat="server"></dx:ASPxDateEdit>
                                            </td>
                                        </tr>
                                    </table>
                                </dx:PanelContent>
                            </PanelCollection>
                        </dx:ASPxPanel>
                    </div>
                </div>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <div class="CssCuerpo">
                            <table class="style1">
                                <tr>
                                    <td class="style4">                            
                                        <dx:ASPxLabel ID="lblTipoEncuesta" runat="server" Text="Tipo de Encuesta"></dx:ASPxLabel>
                                    </td>
                                    <td class="style4">
                                        <dx:ASPxComboBox ID="cboTipoEncuesta" runat="server" SelectedIndex="0">
                                            <Items>
                                                <dx:ListEditItem Selected="True" Text="Operador de Venta" Value="OV" />
                                                <dx:ListEditItem Text="Producto/Servicio" Value="PS" />
                                            </Items>
                                        </dx:ASPxComboBox>
                                    </td>
                                    <td></td>
                                </tr>
                            </table>
                            <fieldset class="periodo">
                                <legend>Periodo</legend>
                                <table class="style1">
                                    <tr>
                                        <td>
                                            Desde : 
                                        </td>
                                        <td>
                                            <dx:ASPxDateEdit ID="dtpDesde" runat="server">
                                            </dx:ASPxDateEdit>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Hasta : 
                                        </td>
                                        <td>
                                            <dx:ASPxDateEdit ID="dtpHasta" runat="server">
                                            </dx:ASPxDateEdit>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" align="right" style="padding-top:0.75em;">
                                            <dx:ASPxButton ID="btnGenerarReporte" runat="server" 
                                                Text="Generar Reporte" AutoPostBack="False" 
                                                OnClick="GenerarReporte" style="margin-top: 0px">
                                            </dx:ASPxButton>
                                        </td>
                                    </tr>
                                </table>

                            </fieldset>
                            <div>                    
                                <table class="style1">
                                    <tr>
                                        <td colspan="2">
                                            <span class="style3">Reporte de Encuestas</span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <dx:ASPxGridView ID="dgvReporteVentas" runat="server" AutoGenerateColumns="False" Width="100%" CssClass="style5" KeyFieldName="concepto">
                                                <Columns>
                                                    <dx:GridViewDataTextColumn Caption="Concepto" FieldName="concepto" 
                                                        ShowInCustomizationForm="True" VisibleIndex="0">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="Porcentaje" FieldName="porcentaje" 
                                                        ShowInCustomizationForm="True" VisibleIndex="1" Width="50px">
                                                    </dx:GridViewDataTextColumn>
                                                </Columns>
                                                <SettingsBehavior AllowFocusedRow="True" AllowSelectSingleRowOnly="True" />
                                            </dx:ASPxGridView>
                                        </td>
                                    </tr>
                                    <tr  style="height:55px;">
                                        <td align="right" class="style8" colspan="2">
                                            <dx:ASPxButton ID="btnImprimir" runat="server" Text="Imprimir" AutoPostBack="false" Width="100px">
                                            </dx:ASPxButton>
                                        </td>
                                    </tr>
                                </table>                    
                            </div>
                        </div>
                        <div id="PopPup">
                            <dx:ASPxPopupControl ID="pcMensaje" runat="server" 
                                    ClientInstanceName="pcMensaje" HeaderText="Mensaje" 
                                    Width="350px" CloseAction="CloseButton" 
                                    AllowDragging="True" EnableTheming="True" Modal="True" 
                                    PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
                                    AllowResize="True" DragElement="Window">
                                <HeaderStyle>
                                    <Paddings PaddingLeft="30px" />
                                    <BackgroundImage HorizontalPosition="10px" ImageUrl="~/img/iconError.png" Repeat="NoRepeat" />
                                </HeaderStyle>
                                <ContentCollection>
                                    <dx:PopupControlContentControl>
                                        <table class="style1">
                                            <tr>
                                                <td align="center">
                                                    <dx:ASPxLabel ID="lblMensaje" runat="server">
                                                    </dx:ASPxLabel>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">                                                
                                                    <div style="padding:15px 0 0 0;" >
                                                        <dx:ASPxButton ID="btnPopUpAceptar" runat="server" Text="Aceptar" Width="100px"  AutoPostBack="False">
                                                                <ClientSideEvents Click="function(s, e) {pcMensaje.Hide();}" />
                                                        </dx:ASPxButton>
                                                    </div>                                                        
                                                </td>
                                            </tr>
                                        </table>
                                    </dx:PopupControlContentControl>
                                </ContentCollection>
                            </dx:ASPxPopupControl>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </dx:PanelContent>
        </PanelCollection>
    </dx:ASPxRoundPanel>
</asp:Content>
